/*
 * 3662.cpp
 *
 *  Created on: 2013-5-3
 *      Author: zy
 */

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

const int MOD = 1000000007;
int f[2][1010][1010];
int fac[1010];
int N, M, K, cnt;
int LCM[1010][1010];
int gcd(int a, int b)
{
	if (b == 0) return a;
	return gcd(b, a % b);
}
int lcm(int a, int b)
{
	return a / gcd(a, b) * b;
}
void init()
{
	fac[1] = 1;
	cnt = 1;
	for (int i = 2; i <= M; i++)
		if (M % i == 0)
		{
			cnt++;
			fac[cnt] = i;
		}
	memset(f, 0, sizeof(f));
	for (int i = 1; i <= cnt; i++)
		f[1][fac[i]][fac[i]] = 1;
}

int main()
{
	for (int i = 1; i <= 1000; i++)
		for (int j = 1; j <= 1000; j++)
			LCM[i][j] = lcm(i, j);
	while (scanf("%d%d%d", &N, &M, &K) != EOF)
	{
		init();
		for (int i = 1; i < K; i++)
		{
			for (int j = 1; j <= N; j++)
				for (int k = 1; k <= cnt; k++)
				{
					if (f[i % 2][j][fac[k]] == 0) continue;
					for (int t = 1; t <= cnt; t++)
					{
						int x = j + fac[t];
						int y = LCM[fac[k]][fac[t]];
						if (x > N || M % y != 0) continue;
						f[(i + 1) % 2][x][y] += f[i % 2][j][fac[k]];
						f[(i + 1) % 2][x][y] %= MOD;
					}

				}
			for (int j = 1; j <= N; j++)
				for (int k = 1; k <= cnt; k++)
					f[i % 2][j][fac[k]] = 0;
		}
		printf("%d\n", f[K % 2][N][M]);
	}
}
